package org.petstore.web.servlet;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.IOException;

import static org.petstore.web.servlet.util.ServletUtil.REGISTER_FORM;

public class RegisterFormServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request, response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("application/json;charset=utf-8");
        request.getRequestDispatcher(REGISTER_FORM).forward(request, response);
    }
}
